#ifndef BUTLERSERVICE_H
#define BUTLERSERVICE_H

#include <QCoreApplication>
#include "butler.h"

class ButlerService : public QtService<QCoreApplication>
{
public:
    ButlerService(int argc, char *argv[]):
        QtService<QCoreApplication>(argc, argv, SP_NAME)
    {
        setServiceDescription("Butler Service For QVertex Project");
        // setServiceFlags(QtService::CanBeSuspended);
        // setStartupType(QtServiceController::AutoStartup);
    }

protected:
    void start()
    {
        QCoreApplication *app = application();
        butler=new Butler(app);
        butler->start();
    }

    void stop()
    {
        butler->stop();
    }

private:
    Butler *butler;
};

#endif // BUTLERSERVICE_H
